<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_NOTICE",FALSE);?><!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>编辑属性</title>
<script type='text/javascript' src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/css/hdui.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdui/js/hdui.js'></script>
<link href='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/css/hdvalidate.css' rel='stylesheet' media='screen'>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdvalidate/js/hdvalidate.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/cal/lhgcalendar.min.js'></script>
<script src='http://localhost/gks/1113/hdphp/hdphp/Extend/Org/hdjs/hdslide/js/hdslide.js'></script>
<script type='text/javascript'>
HOST = 'http://localhost';
ROOT = 'http://localhost/gks/1113/hshop';
WEB = 'http://localhost/gks/1113/hshop/index.php';
URL = 'http://localhost/gks/1113/hshop/index.php/Admin/Attribute/edit/attr_id/7';
APP = 'http://localhost/gks/1113/hshop/HSHOP';
COMMON = 'http://localhost/gks/1113/hshop/HSHOP/Common';
HDPHP = 'http://localhost/gks/1113/hdphp/hdphp';
HDPHPDATA = 'http://localhost/gks/1113/hdphp/hdphp/Data';
HDPHPEXTEND = 'http://localhost/gks/1113/hdphp/hdphp/Extend';
MODULE = 'http://localhost/gks/1113/hshop/index.php/Admin';
CONTROLLER = 'http://localhost/gks/1113/hshop/index.php/Admin/Attribute';
ACTION = 'http://localhost/gks/1113/hshop/index.php/Admin/Attribute/edit';
STATIC = 'http://localhost/gks/1113/hshop/Static';
HDPHPTPL = 'http://localhost/gks/1113/hdphp/hdphp/Lib/Tpl';
VIEW = 'http://localhost/gks/1113/hshop/HSHOP/Admin/View';
PUBLIC = 'http://localhost/gks/1113/hshop/HSHOP/Admin/View/Public';
CONTROLLERVIEW = 'http://localhost/gks/1113/hshop/HSHOP/Admin/View/Attribute';
HISTORY = 'http://localhost/gks/1113/hshop/index.php/Admin/Attribute/index/cat_id/5';
</script>
</head>
<body>
	<div class="wrap">
		<div class="menu_list">
			<ul>
				<li><a href="<?php echo U('Attribute/index');?>">类型属性列表</a></li>
			</ul>
		</div>
		<form action="" method="post" class="hd-form">
		<div class="title-header">编辑属性</div>
		<input type="hidden" name="attr_id" value="<?php echo $data['attr_id'];?>">
			<table class="table1">
				<tr>
					<th class="w200">属性名称</th>
					<td>
						<input type="text" name="attr_name" class="w200" value="<?php echo $data['attr_name'];?>" />
					</td>
				</tr>
				<tr>
					<th>商品类型</th>
					<td>
						<select name="cat_id">
						<?php $hd["list"]["gt"]["total"]=0;if(isset($goods_type) && !empty($goods_type)):$_id_gt=0;$_index_gt=0;$lastgt=min(1000,count($goods_type));
$hd["list"]["gt"]["first"]=true;
$hd["list"]["gt"]["last"]=false;
$_total_gt=ceil($lastgt/1);$hd["list"]["gt"]["total"]=$_total_gt;
$_data_gt = array_slice($goods_type,0,$lastgt);
if(count($_data_gt)==0):echo "";
else:
foreach($_data_gt as $key=>$gt):
if(($_id_gt)%1==0):$_id_gt++;else:$_id_gt++;continue;endif;
$hd["list"]["gt"]["index"]=++$_index_gt;
if($_index_gt>=$_total_gt):$hd["list"]["gt"]["last"]=true;endif;?>

							<option value="<?php echo $gt['cat_id'];?>"  <?php if($gt['cat_id'] == $cat_id){?>selected=""<?php }?>><?php echo $gt['cat_name'];?></option>
						<?php $hd["list"]["gt"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
						</select>
					</td>
				</tr>
				<tr>
					<th class="w200">属性类型</th>
					<td>
						<label><input type="radio" name="attr_type" class="w30" value="0" <?php if($data['attr_type'] == 0){?>checked=""<?php }?>/>普通属性</label>
						<label><input type="radio" name="attr_type" class="w30" value="1" <?php if($data['attr_type'] == 1){?>checked=""<?php }?>/>规格属性</label>
						<span style="font-size: 10px;color: #F00;text-indent: 2em;display: inline-block;">*规格属性用于指定某一商品</span>
					</td>
				</tr>
				<tr>
					<th class="w200">录入方式</th>
					<td>
						<lable><input type="radio" name="attr_input_type" class="w30" value="0"  <?php if($data['attr_input_type'] == 0){?>checked=""<?php }?>/>文本框</lable>
						<lable><input type="radio" name="attr_input_type" class="w30" value="1" <?php if($data['attr_input_type'] == 1){?>checked=""<?php }?>/>下拉列表框</lable>
						<lable><input type="radio" name="attr_input_type" class="w30" value="2" <?php if($data['attr_input_type'] == 2){?>checked=""<?php }?>/>文本域</lable>
						<span style="font-size: 10px;color: #F00;text-indent: 2em;display: inline-block;">*选择下拉列表框必须输入默认值</span>
					</td>
				</tr>
				<tr>
					<th>属性值</th>
					<td>
						<textarea name="attr_value" class="w300 h100" style="resize:none;"><?php echo $data['attr_value'];?></textarea>
						<span style="font-size: 10px;color: #F00;margin-left:10px;display: none;" class="areaTips">*一行输入一个值</span>
					</td>
				</tr>
				<tr>
					<td colspan="2"><input type="submit" value="提交修改" class="hd-success"></td>
				</tr>
			</table>
		</form>
	</div>
	<script type="text/javascript" src="http://localhost/gks/1113/hshop/HSHOP/Admin/View/Attribute/js/js.js"></script>
</body>
</html>